<?php
  require "home/ViewModel.php";
  class Controller{
      protected $mod;//模型层对象
      protected $view;//视图层对象
      function __construct(){
        $c = isset($_GET['c'])?$_GET['c']:'index';
        $m = isset($_GET['m'])?$_GET['m']:'index';
      	$this->view=new 
      	 ViewModel('home/view/'.$c.'/'.$m);
      }
      public function assign($variable,$value)
      {
      	$this->view->assign($variable,$value);
      }
      public function display(){
      	$this->view->display();
      }
  }
  ?>